<!DOCTYPE html>
<html lang="zh" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
    <title>管理端 | 麦克斯仇的博客</title>
    <link rel="icon" href="/favicon.ico">
    <link rel="stylesheet" type="text/css" href="https://cdn.staticfile.org/layui/2.5.7/css/layui.min.css"/>
    <link rel="stylesheet" type="text/css" href="/assets/editor.md/css/editormd.min.css"/>
    <style type="text/css">
        * {
            font-family: Consolas, "Helvetica Neue", Helvetica, "PingFang SC", Tahoma, Arial, sans-serif;;
        }

        .main {
            padding: 6px 6px 0;
        }

        .editormd-code-toolbar select {
            display: inline-block !important;
        }

        .editormd-preview-container li {
            list-style: unset;
        }

        #container {
            bottom: 0;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">博客后台管理</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="/_admin/logout">退出</a>
            </li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black" id="navigation">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域 -->
            <ul class="layui-nav layui-nav-tree" id="menu">
                <li class="layui-nav-item"><a data-pjax href="/_admin">控制台</a></li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:">文章</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/_admin/article/manager">文章管理</a></dd>
                        <dd><a href="/_admin/discuss/manager">评论管理</a></dd>
                        <dd><a href="/_admin/label/manager">标签管理</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-body" id="container" th:include="::content">
    </div>
</div>
<script src="https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdn.staticfile.org/layui/2.5.7/layui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/assets/editor.md/editormd.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    function jump(url) {
        window.location.href = url;
    }

    $(document).ready(function () {
        let path = window.location.pathname;
        if (path == "/_admin") {
            $('#menu a[href="/_admin"]').parent().addClass("layui-this");
            return;
        }
        // 仅取第一个斜杠以及后缀
        while (path.lastIndexOf("/") != 7) {
            path = path.substr(0, path.lastIndexOf("/"));
        }
        // 激活样式
        $('#menu a[href^="' + path + '"]').parent().addClass("layui-this");
    });
</script>
<script type="text/javascript" th:include="::pageScript"></script>
</body>
</html>
